

{% extends "bootstrap/base.html" %}
{% block title %}
    销售排行
{% endblock %}
{% include 'nav.html' %}
{% block content %}
<body background="{{ url_for('static', filename='images/background.jpg') }}">
<div class="container login-page" style="padding-top: 20px">
    <div class="row">
        <div class="table-responsive">
            <table class="table">
                <caption>库存列表</caption>
                <thead>
                    <tr>
                        <th>产品名称</th>
                        <th>产品条码</th>
                        <th>产品型号</th>
                        <th>生产日期</th>
                        <th>保质期</th>
                        <th>批号</th>
                        <th>销售数量</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                {% for commodity in commodity %}
                    <tr>
                        <td>{{ commodity.name }}</td>
                        <td>{{ commodity.tcode }}</td>
                        <td>{{ commodity.xingh }}</td>
                        <td>{{ commodity.shengcrq }}</td>
                        <td>{{ commodity.baozq }}</td>
                        <td>{{ commodity.pih }}</td>
                        <td>{{ costs[commodity.id] }}</td>
                        <td><a href="{{ url_for('admin.commodity_delete',id=commodity.id) }}">删除</a></td>
                    </tr>
                {% endfor %}
                </tbody>
        </table>
        </div>
    </div>
</div>
</body>
{% endblock %}
